  <!-- 
  <script type="text/javascript">
  $(function() {
    
    var galleries = $('.ad-gallery').adGallery();
    /*
    setTimeout(function() {
      galleries[0].addImage("images/thumbs/t7.jpg", "images/7.jpg");
    }, 1000);
    setTimeout(function() {
      galleries[0].addImage("images/thumbs/t8.jpg", "images/8.jpg");
    }, 2000);
    setTimeout(function() {
      galleries[0].addImage("images/thumbs/t9.jpg", "images/9.jpg");
    }, 3000);
    setTimeout(function() {
      galleries[0].removeImage(1);
    }, 4000);
    
    $('#switch-effect').change(
      function() {
        galleries[0].settings.effect = $(this).val();
        return false;
      }
    );
    $('#toggle-slideshow').click(
      function() {
        galleries[0].slideshow.toggle();
        return false;
      }
    );
    $('#toggle-description').click(
      function() {
        if(!galleries[0].settings.description_wrapper) {
          galleries[0].settings.description_wrapper = $('#descriptions');
        } else {
          galleries[0].settings.description_wrapper = false;
        }
        return false;
      }
    );
    */
  });
  </script>
  -->
<div id="gallery" class="ad-gallery">
    <div class="ad-image-wrapper">
    </div>
    <div class="ad-controls">
    </div>
    <div class="ad-nav">
    <div class="ad-thumbs">
      <ul class="ad-thumb-list">
      <?php $i = 1;?>
      <?php foreach($images as $image):?>
      <?php 
        $mid_image = $this->getFirmImgSrc($image['name'], 'firms_img_mid');
        $thumb_image = $this->getFirmImgSrc($image['name'], 'firms_img_thumb');
      ?>
        <li>
          <a href="<?php echo $mid_image;?>" >
            <img src="<?php echo $thumb_image;?>" title="<?php echo GxHtml::encode($image['title']);?>" alt="<?php echo GxHtml::encode($image['description']);?>" class="image<?php echo $i;?>">
          </a>
        </li>   
      <?php $i++;?>
      <?php endforeach;?>
      </ul>
    </div>
    </div>
</div>  
  